package com.ihg.hiex.entity.session.during.report;

import java.beans.Transient;
import java.util.Map;

import com.ihg.hiex.entity.session.during.SessionAnchorScoreType;
import com.ihg.hiex.entity.session.during.SessionCalibrationCompetency;

/**
 * 
 * @author dan
 *
 */
public class SessionReportCompetency {
    
    /** drive Result score */
    private SessionAnchorScoreType drScore;
    
    private String drStrong;
    
    private String drWeak;
    
    /** work collaboratively score */
    private SessionAnchorScoreType wcScore;
    
    private String wcStrong;
    
    private String wcWeak;
    
    /** champion change score */
    private SessionAnchorScoreType ccScore;
    
    private String ccStrong;
    
    private String ccWeak;
    
    /** Owner Relations score */
    private SessionAnchorScoreType orScore;
    
    private String orStrong;
    
    private String orWeak;
    
    /** lead and development score */
    private SessionAnchorScoreType ldScore;
    
    private String ldStrong;
    
    private String ldWeak;
    
    /** financial management score */
    private SessionAnchorScoreType fmScore;
    
    private String fmStrong;
    
    private String fmWeak;
    
    /** Operations Management score */
    private SessionAnchorScoreType omScore;
    
    private String omStrong;
    
    private String omWeak;
    
    /** Revenue Maximisation score */
    private SessionAnchorScoreType rmScore;
    
    private String rmStrong;
    
    private String rmWeak;
    
    public SessionReportCompetency() {
        
    }
    
    /**
     * 
     * @param competencies
     */
    public SessionReportCompetency(Map<String, SessionCalibrationCompetency> competencies) {
        this.drScore = competencies.get("Drive Result").getScore();
        this.drStrong = competencies.get("Drive Result").getEffective();
        this.drWeak = competencies.get("Drive Result").getInEffective();
        this.wcScore = competencies.get("Work Collaboratively").getScore();
        this.wcStrong = competencies.get("Work Collaboratively").getEffective();
        this.wcWeak = competencies.get("Work Collaboratively").getInEffective();
        this.ccScore = competencies.get("Champion Change").getScore();
        this.ccStrong = competencies.get("Champion Change").getEffective();
        this.ccWeak = competencies.get("Champion Change").getInEffective();
        this.orScore = competencies.get("Owner Relations").getScore();
        this.orStrong = competencies.get("Owner Relations").getEffective();
        this.orWeak = competencies.get("Owner Relations").getInEffective();
        this.ldScore = competencies.get("Lead And Development").getScore();
        this.ldStrong = competencies.get("Lead And Development").getEffective();
        this.ldWeak = competencies.get("Lead And Development").getInEffective();
        this.fmScore = competencies.get("Financial Management").getScore();
        this.fmStrong = competencies.get("Financial Management").getEffective();
        this.fmWeak = competencies.get("Financial Management").getInEffective();
        this.omScore = competencies.get("Operations Management").getScore();
        this.omStrong = competencies.get("Operations Management").getEffective();
        this.omWeak = competencies.get("Operations Management").getInEffective();
        this.rmScore = competencies.get("Revenue Maximisation").getScore();
        this.rmStrong = competencies.get("Revenue Maximisation").getEffective();
        this.rmWeak = competencies.get("Revenue Maximisation").getInEffective();
    }
    
    /**
     * 
     * @param competencies
     * @return
     */
    @Transient
    public Map<String, SessionCalibrationCompetency> changeEffective(Map<String, SessionCalibrationCompetency> competencies) {
      competencies.get("Drive Result").setEffective(this.drStrong);
      competencies.get("Drive Result").setInEffective(this.drWeak);
      competencies.get("Work Collaboratively").setEffective(this.wcStrong);
      competencies.get("Work Collaboratively").setInEffective(this.wcWeak);
      competencies.get("Champion Change").setEffective(this.ccStrong);
      competencies.get("Champion Change").setInEffective(this.ccWeak);
      competencies.get("Owner Relations").setEffective(this.orStrong);
      competencies.get("Owner Relations").setInEffective(this.orWeak);
      competencies.get("Lead And Development").setEffective(this.ldStrong);
      competencies.get("Lead And Development").setInEffective(this.ldWeak);
      competencies.get("Financial Management").setEffective(this.fmStrong);
      competencies.get("Financial Management").setInEffective(this.fmWeak);
      competencies.get("Operations Management").setEffective(this.omStrong);
      competencies.get("Operations Management").setInEffective(this.omWeak);
      competencies.get("Revenue Maximisation").setEffective(this.rmStrong);
      competencies.get("Revenue Maximisation").setInEffective(this.rmWeak);
      
      return competencies;
    }
    
    /**
     * 
     * @param sessionReportCompetency
     * @return
     */
    public SessionReportCompetency editEffective(SessionReportCompetency sessionReportCompetency) {
      this.drStrong = sessionReportCompetency.getDrStrong();
      this.drWeak = sessionReportCompetency.getDrWeak();
      this.wcStrong = sessionReportCompetency.getWcStrong();
      this.wcWeak = sessionReportCompetency.getWcWeak();
      this.ccStrong = sessionReportCompetency.getCcStrong();
      this.ccWeak = sessionReportCompetency.getCcWeak();
      this.orStrong = sessionReportCompetency.getOrStrong();
      this.orWeak = sessionReportCompetency.getOrWeak();
      this.ldStrong = sessionReportCompetency.getLdStrong();
      this.ldWeak = sessionReportCompetency.getLdWeak();
      this.fmStrong = sessionReportCompetency.getFmStrong();
      this.fmWeak = sessionReportCompetency.getFmWeak();
      this.omStrong = sessionReportCompetency.getOmStrong();
      this.omWeak = sessionReportCompetency.getOmWeak();
      this.rmStrong = sessionReportCompetency.getRmStrong();
      this.rmWeak = sessionReportCompetency.getRmWeak();
      
      return this;
    }
    
    /**
     * 
     * @param comptencyName
     * @return
     */
    @Transient
    public String getEffecitve(String comptencyName) {
      if(comptencyName.equalsIgnoreCase("Drive Result")) {
        return this.drStrong;
      } else if(comptencyName.equalsIgnoreCase("Work Collaboratively")) {
        return this.wcStrong;
      } else if(comptencyName.equalsIgnoreCase("Champion Change")) {
        return this.ccStrong;
      } else if(comptencyName.equalsIgnoreCase("Owner Relations")) {
        return this.orStrong;
      } else if(comptencyName.equalsIgnoreCase("Lead And Development")) {
        return this.ldStrong;
      } else if(comptencyName.equalsIgnoreCase("Financial Management")) {
        return this.fmStrong;
      } else if(comptencyName.equalsIgnoreCase("Operations Management")) {
        return this.omStrong;
      } else if(comptencyName.equalsIgnoreCase("Revenue Maximisation")) {
        return this.rmStrong;
      } else {
        return null;
      }
        
    }
    
    /**
     * 
     * @param comptencyName
     * @return
     */
    @Transient
    public String getInEffective(String comptencyName) {
      if(comptencyName.equalsIgnoreCase("Drive Result")) {
        return this.drWeak;
      } else if(comptencyName.equalsIgnoreCase("Work Collaboratively")) {
        return this.wcWeak;
      } else if(comptencyName.equalsIgnoreCase("Champion Change")) {
        return this.ccWeak;
      } else if(comptencyName.equalsIgnoreCase("Owner Relations")) {
        return this.orWeak;
      } else if(comptencyName.equalsIgnoreCase("Lead And Development")) {
        return this.ldWeak;
      } else if(comptencyName.equalsIgnoreCase("Financial Management")) {
        return this.fmWeak;
      } else if(comptencyName.equalsIgnoreCase("Operations Management")) {
        return this.omWeak;
      } else if(comptencyName.equalsIgnoreCase("Revenue Maximisation")) {
        return this.rmWeak;
      }  else {
        return null;
      }
    }

    /**
     * @return the drScore
     */
    public SessionAnchorScoreType getDrScore() {
        return drScore;
    }

    /**
     * @return the drStrong
     */
    public String getDrStrong() {
        return drStrong;
    }

    /**
     * @return the drWeak
     */
    public String getDrWeak() {
        return drWeak;
    }

    /**
     * @return the wcScore
     */
    public SessionAnchorScoreType getWcScore() {
        return wcScore;
    }

    /**
     * @return the wcStrong
     */
    public String getWcStrong() {
        return wcStrong;
    }

    /**
     * @return the wcWeak
     */
    public String getWcWeak() {
        return wcWeak;
    }

    /**
     * @return the ccScore
     */
    public SessionAnchorScoreType getCcScore() {
        return ccScore;
    }

    /**
     * @return the ccStrong
     */
    public String getCcStrong() {
        return ccStrong;
    }

    /**
     * @return the ccWeak
     */
    public String getCcWeak() {
        return ccWeak;
    }

    /**
     * @return the orScore
     */
    public SessionAnchorScoreType getOrScore() {
        return orScore;
    }

    /**
     * @return the orStrong
     */
    public String getOrStrong() {
        return orStrong;
    }

    /**
     * @return the orWeak
     */
    public String getOrWeak() {
        return orWeak;
    }

    /**
     * @return the ldScore
     */
    public SessionAnchorScoreType getLdScore() {
        return ldScore;
    }

    /**
     * @return the ldStrong
     */
    public String getLdStrong() {
        return ldStrong;
    }

    /**
     * @return the ldWeak
     */
    public String getLdWeak() {
        return ldWeak;
    }

    /**
     * @return the fmScore
     */
    public SessionAnchorScoreType getFmScore() {
        return fmScore;
    }

    /**
     * @return the fmStrong
     */
    public String getFmStrong() {
        return fmStrong;
    }

    /**
     * @return the fmWeak
     */
    public String getFmWeak() {
        return fmWeak;
    }

    /**
     * @return the omScore
     */
    public SessionAnchorScoreType getOmScore() {
        return omScore;
    }

    /**
     * @return the omStrong
     */
    public String getOmStrong() {
        return omStrong;
    }

    /**
     * @return the omWeak
     */
    public String getOmWeak() {
        return omWeak;
    }

    /**
     * @return the rmScore
     */
    public SessionAnchorScoreType getRmScore() {
        return rmScore;
    }

    /**
     * @return the rmStrong
     */
    public String getRmStrong() {
        return rmStrong;
    }

    /**
     * @return the rmWeak
     */
    public String getRmWeak() {
        return rmWeak;
    }

    /**
     * @param drScore the drScore to set
     */
    public void setDrScore(SessionAnchorScoreType drScore) {
        this.drScore = drScore;
    }

    /**
     * @param drStrong the drStrong to set
     */
    public void setDrStrong(String drStrong) {
        this.drStrong = drStrong;
    }

    /**
     * @param drWeak the drWeak to set
     */
    public void setDrWeak(String drWeak) {
        this.drWeak = drWeak;
    }

    /**
     * @param wcScore the wcScore to set
     */
    public void setWcScore(SessionAnchorScoreType wcScore) {
        this.wcScore = wcScore;
    }

    /**
     * @param wcStrong the wcStrong to set
     */
    public void setWcStrong(String wcStrong) {
        this.wcStrong = wcStrong;
    }

    /**
     * @param wcWeak the wcWeak to set
     */
    public void setWcWeak(String wcWeak) {
        this.wcWeak = wcWeak;
    }

    /**
     * @param ccScore the ccScore to set
     */
    public void setCcScore(SessionAnchorScoreType ccScore) {
        this.ccScore = ccScore;
    }

    /**
     * @param ccStrong the ccStrong to set
     */
    public void setCcStrong(String ccStrong) {
        this.ccStrong = ccStrong;
    }

    /**
     * @param ccWeak the ccWeak to set
     */
    public void setCcWeak(String ccWeak) {
        this.ccWeak = ccWeak;
    }

    /**
     * @param orScore the orScore to set
     */
    public void setOrScore(SessionAnchorScoreType orScore) {
        this.orScore = orScore;
    }

    /**
     * @param orStrong the orStrong to set
     */
    public void setOrStrong(String orStrong) {
        this.orStrong = orStrong;
    }

    /**
     * @param orWeak the orWeak to set
     */
    public void setOrWeak(String orWeak) {
        this.orWeak = orWeak;
    }

    /**
     * @param ldScore the ldScore to set
     */
    public void setLdScore(SessionAnchorScoreType ldScore) {
        this.ldScore = ldScore;
    }

    /**
     * @param ldStrong the ldStrong to set
     */
    public void setLdStrong(String ldStrong) {
        this.ldStrong = ldStrong;
    }

    /**
     * @param ldWeak the ldWeak to set
     */
    public void setLdWeak(String ldWeak) {
        this.ldWeak = ldWeak;
    }

    /**
     * @param fmScore the fmScore to set
     */
    public void setFmScore(SessionAnchorScoreType fmScore) {
        this.fmScore = fmScore;
    }

    /**
     * @param fmStrong the fmStrong to set
     */
    public void setFmStrong(String fmStrong) {
        this.fmStrong = fmStrong;
    }

    /**
     * @param fmWeak the fmWeak to set
     */
    public void setFmWeak(String fmWeak) {
        this.fmWeak = fmWeak;
    }

    /**
     * @param omScore the omScore to set
     */
    public void setOmScore(SessionAnchorScoreType omScore) {
        this.omScore = omScore;
    }

    /**
     * @param omStrong the omStrong to set
     */
    public void setOmStrong(String omStrong) {
        this.omStrong = omStrong;
    }

    /**
     * @param omWeak the omWeak to set
     */
    public void setOmWeak(String omWeak) {
        this.omWeak = omWeak;
    }

    /**
     * @param rmScore the rmScore to set
     */
    public void setRmScore(SessionAnchorScoreType rmScore) {
        this.rmScore = rmScore;
    }

    /**
     * @param rmStrong the rmStrong to set
     */
    public void setRmStrong(String rmStrong) {
        this.rmStrong = rmStrong;
    }

    /**
     * @param rmWeak the rmWeak to set
     */
    public void setRmWeak(String rmWeak) {
        this.rmWeak = rmWeak;
    }

}
